
#ifndef HTTP_REQUEST_H_
#define HTTP_REQUEST_H_

#define DEAFAULT_REQUESTPATH_LENGTH	1024

typedef enum RequestMethod {
	UnKnownRequest	=	0,
	GetRequest				= 1,
	PostRequest				=	2,
	HeadRequest			=	3,
	PutRequest				=	4,
	DeleteRequest			=	5

}RequestMethod;

typedef struct HttpRequest {
	int id;
	RequestMethod requestMethod;
	char requestPath[DEAFAULT_REQUESTPATH_LENGTH];
} HttpRequest;

struct HttpRequest* initHttpRequest(enum RequestMethod requestMethod);
void destoryHttpRequest(struct HttpRequest* httpRequest);

int setRequestMethod(struct HttpRequest* httpRequest, const char* buf, int bufLen);
int setRequestPath(struct HttpRequest* httpRequest, const char* buf, int bufLen);

#endif /* HTTP_REQUEST_H_ */
